<?php
require('config.php');
$page = new rootLayoutHomePage();
$page->setBaliseTitle('sitemap_balise');
$page->setDescription('sitemap_description');
$tpl_file='sitemap.tpl';
$sitemap = new flyLayout(REP_TPL . $tpl_file);
$sitemap->start();
	$getCat = modelRealEstate::getCatgoryList();// Get real estate type
		if($getCat->size()>0){
			foreach($getCat as $key => $category) {
				$sitemap->setVariable('property_category', $category->title );
				$language_folder = $_SESSION['language_code']==language_default?'':$_SESSION['language_code'].'/';
				$url_page = $category->url_rewriting.'-'.$category->language_link.'.html';
				$sitemap->setVariable('url_property_category', HTTP_HOST.$language_folder.$url_page);
			$sitemap->parseList('list_property_category');
			}
			
		$sitemap->showBlock("block_property_category");
		}
	$listProvinceAll = modelProvince::getProvinceLeft3();
			if($listProvinceAll->size()>0){
				foreach($listProvinceAll as $key => $province) {
				$sitemap->setVariable('province', $province->title );
				$language_folder = $_SESSION['language_code']==language_default?'':$_SESSION['language_code'].'/';
				$url_page = $province->url_rewriting.'-'.$province->language_link.'.html';
				$sitemap->setVariable('url_province', HTTP_HOST.$language_folder.$url_page);
				$sitemap->parseList('list_property_province');
				}
			
			$sitemap->showBlock('block_property_province');
			}
	$listIconeLike = modelLike::getListThreeIconLike();
			if($listIconeLike->size()>0){
				foreach($listIconeLike as $key => $icon_like) {
				$sitemap->setVariable('icon_like', $icon_like->title);
				$language_folder = $_SESSION['language_code']==language_default?'':$_SESSION['language_code'].'/';
				$url_page = $icon_like->url_rewriting.'-'.$icon_like->language_link.'.html';
				$sitemap->setVariable('url_icon_like', HTTP_HOST.$language_folder.$url_page);
				$sitemap->parseList('list_icon_like');
				}
			
			$sitemap->showBlock('rooftop_icon');
			}
		$listHeaderTop = modelLike::getListHeaderTop();
			if($listHeaderTop->size()>0){
				foreach($listHeaderTop as $key => $header_top) {
				$sitemap->setVariable('header_top', $header_top->title);
				$language_folder = $_SESSION['language_code']==language_default?'':$_SESSION['language_code'].'/';
				$url_page = $header_top->url_rewriting.'-'.$header_top->language_link.'.html';
				$sitemap->setVariable('url_header_top', HTTP_HOST.$language_folder.$url_page);
				$sitemap->parseList('list_header');
				}
			
			$sitemap->showBlock('header_top');
			}
$sitemap->stop();
$page->setBody($sitemap);
$page->display();
?>